# /bin/bash 
# run in root
# git and wget/curl acc 
# can reach to www.google.com
apt-get update
pip install shadowsocks
apt-get install polipo

# git acc 
git config --global http.proxy 'socks5h://127.0.0.1:1080'
git config --global https.proxy 'socks5h://127.0.0.1:1080'


which python 

ln -sf $(which python3) /usr/bin/python

which python 

echo '{
  "server": "t.91tianlu.pw",
  "server_port": 16382,
  "local_port": 1080,
  "password": "12153",
  "timeout": 600,
  "method": "aes-256-cfb"
}' > ~/shadowsocks.json
sslocal -c ~/shawdowsocks.json -d start


echo '
proxyAddress = "0.0.0.0"

socksParentProxy = "127.0.0.1:1080"
socksProxyType = socks5

chunkHighMark = 50331648
objectHighMark = 16384

serverMaxSlots = 64
serverSlots = 16
serverSlots1 = 32'  >>/etc/polipi/config

/etc/init.d/polipo restart
export http_proxy="http://127.0.0.1:8123/"
export https_proxy="http://127.0.0.1:8123/"


echo 'you can connect to www.google.com now!'